<?php
$section = "home";
$titre = _LB_HOME;
$link = $section;
Session::setBackLink($link);
//create cfer
$cfer = new Cfer(array(
	_LB_HOME => APPLICATION_URL_FO,
));

$page = new Static_Page();
$page->query("SELECT * FROM STATIC_PAGE WHERE CODE = 'home'");
$page->fetch();


$pageOffer = new Static_Page();
$pageOffer->query("SELECT * FROM STATIC_PAGE WHERE CODE = 'specialOffer'");
$pageOffer->fetch();

$pageAboutUs = new Static_Page();
$pageAboutUs->query("SELECT * FROM STATIC_PAGE WHERE CODE = 'aboutus'");
$pageAboutUs->fetch();

$service = new Service_Booking();
$service->DISABLED = 0;
$service->orderBy("RAND()");
$service->limit(5);
$service->find();

$testiminial = new Testimonial();
$testiminial->DISABLED = 0;
$testiminial->orderBy("ID DESC");
$testiminial->limit(1);
$testiminial->find();

$bsLeft = Business_Solution::getSubItem(0);
Session::setBackCfer($link, $cfer->getCferArray());
$smarty->assign('cfer', $cfer);
$smarty->assign('pageOffer', $pageOffer);
$smarty->assign('pageAboutUs', $pageAboutUs);
$smarty->assign('service', $service);
$smarty->assign('testimonial', $testiminial);
$smarty->assign('bsLeft', $bsLeft);
$smarty->assign('titre', $titre);
$smarty->assign('META_TAG_KEYWORD', ($page->META_KEYWORD == ""? META_TAG_KEYWORD: $page->META_KEYWORD));
$smarty->assign('META_TAG_DESCRIPTION', ($page->META_DESCRIPTION == ""? META_TAG_DESCRIPTION: $page->META_DESCRIPTION));
$smarty->display("home.html");